<?php
require_once '../include/conn.php';
require_once 'header.php';

$h_user = $_POST['user'];
$h_cont = $_POST['cont'];

if($h_cont == 1){
    $sql = "update `h_kefu_status` set ";
    $sql .= "h_stop = 1 ";
    $sql .= "where h_user = '" . $h_user . "' ";
    $db->query($sql);
    echo 'yes';
}else{
    $sql = "update `h_kefu_status` set ";
    $sql .= "h_stop = 0 ";
    $sql .= "where h_user = '" . $h_user . "' ";
    $db->query($sql);
    echo 'no';
}
?>